import { Body, Controller, Get, Post, Res, Req ,Delete, Put} from '@nestjs/common'
import { TypesService } from '../Service/Types.service'
@Controller('Types')
export class TypesController {
    constructor(private readonly TypesService: TypesService) { }
    @Get()
    gettypes(@Res() res) {
        return this.TypesService.gettypes(res)
    }

    @Post("/add")
    add(@Req() req: Request, @Res() res: Response,) {
        return this.TypesService.add(req, res)
    }
    @Post("/get")
    get(@Req() req: Request, @Res() res: Response,) {
        return this.TypesService.get(req, res)
    }
    @Delete("/delete")
    delete(@Req() req: Request, @Res() res: Response,) {
        return this.TypesService.delete(req, res)
    }
    
    @Put("/update")
    update(@Req() req: Request, @Res() res: Response,) {
        return this.TypesService.update(req, res)
    }
}